package com.yan.design.two.structure.s1.adapter1;

/**
 * 1. 适配器模式 - 类适配器
 *      手机类
 * @author shengren.yan
 * @create 2022-07-23
 */
public class Phone {


    public void charing(IVoltage5V iVoltage5V){ if (iVoltage5V.outPut5V() == 5){
            System.out.println("可以充电");
        }else {
            System.out.println("充电失败");
        }
    }
}
